
var _util = require('util/util.js');
var _catalog_service = require('service/catalog-service.js');
var listTemplate = require('./index.string');

require('page/common/header/index.js');

var viewOrder = {
    listDate : {
        itemList    : {},
        productList : {}
    },
    init: function () {
        this.bindEvents();
        this.loadAccountInfo();
        return this;
    },
    bindEvents: function () {
    },
    loadAccountInfo : function(){

        var id = _util.getURLParam('id');
        var route = _util.getURLParam('route');
        var _this = this;
            _catalog_service.getItem(
                route,
                function(res){
                    _this.listDate.headList = _this.itemHeadList;
                    _this.listDate.itemList = res;
                    var result = _util.renderHtml(listTemplate, {ListData : _this.listDate});
                    $('#Item').html(result);

                },
                function(errMsg) {
                    console.log('errMsg...');

                }
            );
    }

}
module.exports = viewOrder.init();